<!--{include(file='head.html')}-->
<div id="wrap">
	<!--{include('left.html')}-->
	<div id="maincont">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<div id="main_c" >
			<form name="seaform" id="seaform" action="<!--{url('admin','tuan','index')}-->" method="post">
				<div class="bt_bk">
					<span class="btn">
						<a href="javascript:void(0);" onclick="$.oper.refresh();return false;">刷新</a>
						<a href="javascript:void(0);" onclick="$.oper.cdelete();return false;">删除</a>
						<a href="<!--{url('admin','tuan','tuanadd')}-->">添加</a>
					</span>
					<span class="state_tip"></span>
					<span class="right red">一件商品只能处于一个有效团购活动中</span>
				</div>
				<input type="hidden" value="<!--{def($pagearr['page'],1)}-->"		name="page" id="page"/>
				<input type="hidden" value="<!--{def($pagearr['pagesize'],10)}-->"	name="pagesize" id="pagesize" />
			</form>
			<!--{include_page("page.html","top")}-->
			<table class="tableStyle" border="0" cellspacing="0" cellpadding="0">
				<thead>
					<tr align="center">
						<th width="10%">
							<input type="checkbox" value="1" name="allselect" id="allselect" autocomplete="off" onclick="$.oper.selectall()"/>
						</th>
						<th width="10%">操作</th>
						<th width="40%">主题</th>
						<th width="30%" colspan="2">商品</th>
						<th width="30%">时间</th>
						<th width="10%">是否发布</th>
					</tr>
				</thead>
				<tbody id="listtbody">
					<!--{foreach $tuans tuan}-->
					<tr align="center" id="tr_<!--{$tuan.tuanid}-->">
						<td><input type="checkbox" value="<!--{$tuan.tuanid}-->" name="singleselect" autocomplete="off"/></td>
						<td>
							<a href="<!--{url('admin','tuan','tuanedit','tuanid=$tuan.tuanid')}-->" class="edit"></a>
							<a href="javascript:void(0);" onclick="$.oper.cdelete('<!--{$tuan.tuanid}-->');return false;" class="del"></a>
						</td>
						<td><!--{$tuan.subject}--></td>
						<td align="left" width="5%">
							<a href="<!--{url('index','item','index','itemid=$tuan.itemid')}-->" target="_blank">
								<img src = "<!--{$tuan.itemimg}-->_50x50.jpg" width="50" height="50" onerror="this.onerror='',this.src='images/nopicture.jpg'" class="mid"/>
							</a>
						</td >
						<td align="left" width="25%">
							<a href="<!--{url('index','item','index','itemid=$tuan.itemid')}-->" target="_blank"><!--{$tuan.itemname}--></a>
						</td>
						<td><!--{date('m-d',$tuan.begintime)}--> - <!--{date('m-d',$tuan.endtime)}--></td>
						<td>
<a href="<!--{url('admin','tuan','tuansave','opertype=editfield&field=publish&tuanid=$tuan.tuanid')}-->" 
<!--{if $tuan.ispublish}-->class="publish" title="设为无效"<!--{else}-->class="unpublish" title="设为有效"<!--{/if}-->></a>
						</td>	
					</tr>
					<!--{/foreach}-->
				</tbody>
			</table>
			<!--{include_page("page.html","foot")}-->
		</div>
		<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
	</div>
</div>
<!--{include(file='foot.html')}-->
<script type="text/javascript">
$(function(){
	$.oper.init("<!--{url('admin','tuan','tuansave')}-->");
});
</script>